package com.isoftstone.merchant.service.feeUser;

import com.isoftstone.common.Page;
import com.isoftstone.merchant.entity.feeUser.MFeeUser;
import com.isoftstone.merchant.entity.mdept.MDept;
import com.isoftstone.util.PageData;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by as on 2017/12/4.
 */
public interface FeeUserService {

    List<MFeeUser> getFeeUserlistPage(Page page)throws Exception;

    Integer getFeeUserCountFromPayment(String feeUserId,String feeStatus,String status)throws Exception;

    Integer deleteFeeUserCountFromPayment(String feeUserId)throws Exception;

    void deleteFeeUserById(String feeUserId)throws Exception;

    MFeeUser getFeeUserById(String feeUserId)throws Exception;

    List<MFeeUser> getExcelAllFeeUserList( Map<String,Object> map)throws Exception;

    Integer updateFeeUserStatus(PageData pd)throws Exception;

    //批量导入
    void saveFeeUserByExcel(MFeeUser mus)throws Exception;
    //查询缴费编号是否存在
    Integer getFeeUserId(String feeId,String corpId)throws Exception;

    public List<MDept> getalldept(String deptId) throws Exception;

    Integer getFeeUserId1(Map<String, Object> feeId)throws Exception;


    void updateFeeUser(MFeeUser mFuser)throws Exception ;

    /**
     * 根据缴费单位id查询缴费编号
     */
    List<MFeeUser> queryFeeIdByCropId(String cropId ,String openAccount) throws Exception;

    /**
     * 根据缴费编号查询缴费详细信息
     */
    MFeeUser queryFeeUserByFeeId(@Param("feeId") String feeId,@Param("corpId")String corpId) throws Exception;

    /**
     * 根据商户Id和缴费编号查询
     */
    MFeeUser queryFeeUserByCorpIdAndFeeId(String feeId,String cropId) throws Exception;

    /**
     * 根据corpId查询该缴费单位下的所有缴费编号
     */
    List<MFeeUser> getFeeIdByCropId(String cropId) throws Exception;

    /**
     * 缴费用户添加时根据商户id和缴费编号查询
     */
    MFeeUser getFeeUserByCorpIdAndFeeId(@Param("feeId") String feeId,@Param("cropId")String cropId) throws Exception;

    /**
     * 解约
     */
    void cancelContract(@Param("feeId") String feeId, @Param("cropId")String cropId, @Param("status") String status)throws Exception;

    /**
     * 申请绑定
     */
    void addFeeUser(MFeeUser feeUser) throws Exception;

    /**
     * 续约
     */
    void extentContract(String feeId,  String corpId, String status) throws Exception;

    MFeeUser getfeeUserByFeeId(String feeId,String corpId)throws Exception;

    Integer getFeeUserId2(String feeId, String feeUserId)throws Exception;

    //String findFeeUserIdByFeeId(String feeId);
    String findFeeUserIdByFeeId(MFeeUser mFeeUser);

    List<MFeeUser> getHandFeeUserlistPage(Page page)throws Exception;

    List<MFeeUser> getFeeUserlistPageDept(List<MFeeUser> feeUsertList0)throws Exception;

    MFeeUser getCountFeeUser(Page page)throws Exception;
    //统计所有缴费用户
    Integer getAllUserNumber(Page page)throws Exception;
    //统计当天新增缴费用户
    Integer getTodayUserNumber(Page page)throws Exception;

    List<MFeeUser> getFeeUserByDeptId(String deptId)throws Exception;

    List<MDept> getalldeptByUserId(String userId)throws Exception;

    Integer getAllUserNumbers(PageData allUserPageDate)throws Exception;

    Integer getTodayUserNumbers(PageData todayUserPageDate)throws Exception;
}
